#include<stdio.h>
int upperNum, lowerNum, other;
char b[10];
int main(){
    scanf("%s",&b);
    for (int i=0;b[i];i++)
    {
        if(b[i] >= 'A' && b[i] <= 'Z') upperNum++;
        else if (b[i] >= 'a' && b[i] <= 'z') lowerNum++;
        else other++;
    }
    printf("%d %d %d",upperNum,lowerNum,other);
    return 0;
}